import Vue from 'vue'
import App from './App'
import uView from "uview-ui";
Vue.use(uView);

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
  ...App
})

//挂载http请求服务
import http from "@/common/http.interceptor.js"
Vue.use(http,app)

//挂载系统服务
import sys from "@/common/sys.js"
Vue.use(sys,app)

//挂载API接口代理
import proxy from '@/proxy'
Vue.use(proxy, app)

app.$mount()


//检查登录状态
Vue.prototype.checkLogin = function(){
	
	let userkey = uni.getStorageSync("userkey")["token"]
	
	if(typeof userkey != 'undefined'){
		//跳转
		this.$u.route({
			
			type:"switchTab",
			 
			url: 'pages/my/my',
			
		})
		return;
	}
}


  